Currently, various types of terminals have been playing an increasingly important role in our lives, and with the growing popularity of intelligent machines, intelligent terminals and mobile terminals have played an increasingly important role in our daily lives. The security issue of intelligent terminals has also been highlighted, and all of the existing intelligent terminals provide a function of selectively setting screen locking, such as pattern unlocking, PIN unlocking, password unlocking, and so on, which meet their own individualizations to ensure the privacy of the terminals. Usually if you set these unlocking modes but later forget the unlocking pattern or the unlocking password set by yourself, you need to restore it by upgrading its version via an appropriate after-sales service site, which not only wastes the time, but also results in a loss of important data in the terminal because of upgrading the version.